# CMakeList.txt: learn1 的 CMake 项目，在此处包括源代码并定义
# 项目特定的逻辑。
#
cmake_minimum_required (VERSION 3.20)
project (oepnpcb)

option(GLM_BUILD_LIBRARY "Build dynamic/static library" ON)

option(GLM_ENABLE_CXX_98 "Enable C++ 98" OFF)
option(GLM_ENABLE_CXX_11 "Enable C++ 11" OFF)
option(GLM_ENABLE_CXX_14 "Enable C++ 14" OFF)
option(GLM_ENABLE_CXX_17 "Enable C++ 17" ON)
option(GLM_ENABLE_CXX_20 "Enable C++ 20" OFF)

set(CMAKE_CXX_STANDARD 17)

add_subdirectory(third_party)
add_subdirectory(src)
# set(GLFW_INCLUDE "D:/runtime_library/glfw-3.4/include")
# set(GLAD_GL_INCLUDE "D:/runtime_library/glfw-3.4/deps")
# set(GLAD_INCLUDE "D:/runtime_library/glad/include")
# set(GLFW_LIB "D:/runtime_library/glfw-3.4/build/src/Release")

# include_directories(
# 	${GLFW_INCLUDE}
# 	${GLAD_INCLUDE}
# 	${GLAD_GL_INCLUDE}
#     "include"
# )

# link_directories(
# 	${GLFW_LIB}
# )

# set(SOURCE_LIST "")
# set(SOURCE_INC_LIST "")

# list(APPEND SOURCE_LIST "core/glad.c" "core/main_win.cpp")
# list(APPEND SOURCE_INC_LIST "openpcb.h")

# 将源代码添加到此项目的可执行文件。
# add_executable (${PROJECT_NAME} WIN32 ${SOURCE_LIST} ${SOURCE_INC_LIST})
# execute_process(COMMAND ${CMAKE_COMMAND} -E del ${CMAKE_CURRENT_SOURCE_DIR}/triangles.vert ${CMAKE_CURRENT_SOURCE_DIR}/triangles.frag)
# execute_process(COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/triangles.vert ${CMAKE_CURRENT_BINARY_DIR})
# execute_process(COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/triangles.frag ${CMAKE_CURRENT_BINARY_DIR})

# target_link_libraries(${PROJECT_NAME}
# 	glfw3
# )

# TODO: 如有需要，请添加测试并安装目标。
